<?php

//UMA new
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateScoreRanksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('score_ranks', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('score_rank', 50)->unique()->comment('ランク');
            $table->smallInteger('min_score')->comment('スコア最小値');
            $table->smallInteger('max_score')->comment('スコア最大値');
            $table->double('median_interests', 4, 2)->comment('金利中央値');
            $table->double('min_interests', 4, 2)->comment('金利最小値');
            $table->double('max_interests', 4, 2)->comment('金利最大値');
            $table->string('message', 255)->comment('rank comment');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('score_ranks');
    }
}
